<style lang="scss">
  @import 'index';
</style>

<template>
  <div class="ga-container">
    <div class="ga-product-spike">
      <div class="banner">
        <img mode="widthFix" src="http://ga-1255639017.file.myqcloud.com/images/shop/banner4.jpg" alt="">
      </div>

      <ul class="ga-group-list ga-media-list">
        <li v-for="(item,index) in seckilllist" :key="index">
          <a class="item" :href="'../SeckillDetail/main?id='+item.seid">
            <div class="item-media">
              <image class="img-box" mode="aspectFill" :src="item.icon"></image>
            </div>
            <div class="item-inner">
              <p class="title">{{item.title}}</p>
              <p class="p1">结束时间：{{item.end}}</p>
              <p class="p2">已抢{{item.seckill_num}}件</p>
              <p class="p3">
                ¥ {{item.price}}
                <span>¥ {{item.shop_price}}</span>
              </p>
              <div class="btn primary">马上抢 <i class="icon-angle-right"></i></div>
            </div>
          </a>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
        seckilllist: []
    }
  },
  methods: {
      /** 接口数据 */
      async load (){
          this.$_util.ajax.get('https://guo-a.com/mapi/seckill/getlist').then((res) => {
               console.log(res)
              if(res.code === 200){
                   this.seckilllist = res.data
              }
          })

      }
  },
  created () {

  },
  mounted () {
     this.load()
  }
}
</script>
